package ee.roosideSoda.frontend.controller.eventfinders;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class AdminInterfaceEventFinder implements EventFinder
{
	private final String EMPTY_STRING = "";
		
	@Override
	public String leiaSyndmus(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException 
	{
		//String syndmus = "undefined";
		String syndmus = "adminInterfaceLehekylg";
		
		try 
		{
			String mode = request.getParameter("mode");
			
			if (mode != null && mode.equals("lopetaAntudTiimidegaMangimine"))
			{
				syndmus = "lopetaAntudTiimidegaMangimine";
			}
			
			if (mode != null && mode.equals("alustaJargmistYldkysimustSamadeTiimidega"))
			{
				syndmus = "alustaJargmistYldkysimustSamadeTiimidega";
			}
			
			if (mode != null && mode.equals("uuteYldkysimusteLoomiseLehekylg"))
			{
				syndmus = "uuteYldkysimusteLoomiseLehekylg";
			}
		}
		catch (Exception e) 
		{
			e.printStackTrace();
		}
		return syndmus;
	}
}